<template>
  <div class="da">
    <!-- <div class="swiper mySwiper">
      <div class="swiper-wrapper">
        <div
          class="swiper-slide"
          v-for="(item, index) in tu"
          :class="{ beijing: index == bianse }"
          @click="mey(index), select(item)"
        >
          {{ item.type }}
        </div>
      </div>
    </div> -->

    <ul>
      <li
        v-for="(item, index) in tu"
        :class="{ beijing: index == bianse }"
        @click="mey(index), select(item)"
      >
        {{ item.type }}
      </li>
    </ul>
    <div class="You">
      <div v-show="sel === 1" class="nv" v-for="item in youNavNv">
        <img :src="item.URL" alt="" class="img-1" />
        <div class="nav">
          <span class="span-1">{{ item.tuan }}人团</span>
          <span class="span-2">{{ item.biao }} </span>
          <p>未拼中分瓜￥{{ item.fen }} 参与奖</p>
          <div class="button">
            <span class="span-3">${{ item.money }} </span>
            <span class="span-4">已拼{{ item.jian }}件</span>
          </div>
        </div>
      </div>
      <div v-show="sel === 2" class="nv" v-for="item in youNavNan">
        <img :src="item.URL" alt="" class="img-1" />
        <div class="nav">
          <span class="span-1">{{ item.tuan }}人团</span>
          <span class="span-2">{{ item.biao }} </span>
          <p>未拼中分瓜￥{{ item.fen }} 参与奖</p>
          <div class="button">
            <span class="span-3">${{ item.money }} </span>
            <span class="span-4">已拼{{ item.jian }}件</span>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>
import fengjing from "../../assets/fengjing.jpeg";
import baozi from "../../assets/baozi.jpeg";
import haibao from "../../assets/haibao.jpeg";
import xiyang from "../../assets/xiyang.jpeg";
import shuidi from "../../assets/shuidi.jpeg";
import Swiper from "swiper";
export default {
  name: "FenLeiContent",
  data() {
    return {
      bianse: 0,
      sel: 1,
      tu: [
        {
          type: "女装",
          id: 1,
        },
        {
          type: "男装",
          id: 2,
        },
        {
          type: "女鞋",
        },
        {
          type: "男鞋",
        },
        {
          type: "内衣配饰",
        },
        {
          type: "箱包手袋",
        },
        {
          type: "个护清洁",
        },
        {
          type: "美妆护肤",
        },
        {
          type: "母婴童装",
        },
        {
          type: "女鞋",
        },
        {
          type: "女鞋",
        },
        {
          type: "户外运动",
        },
        {
          type: "生鲜果蔬",
        },
      ],
      youNavNv: [
        {
          URL: baozi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: xiyang,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: haibao,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: shuidi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: fengjing,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: baozi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
      ],
      youNavNan: [
        {
          URL: shuidi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: baozi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: fengjing,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: haibao,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: baozi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
        {
          URL: shuidi,
          tuan: 2,
          biao: "题标题标题标题标题标题",
          fen: 10,
          money: "12.00",
          jian: 55,
        },
      ],
    };
  },
//   mounted() {
//       new Swiper(".mySwipe", {
//           slidesPerView: 5,
//       spaceBetween: 0,
//     direction: "vertical",
//     nested:true,
// 		slidesPerView: 'auto',
//         pagination: {
//           el: ".swiper-pagination",
//           clickable: true,
//         },
     
//     });
//   },
  methods: {
    mey(index) {
      console.log(index);
      this.bianse = index;
    },
    select(item) {
      this.sel = item.id;
    },
  },
};
</script>

<style lang="less" scoped>
// @import "../../../node_modules/swiper/swiper-bundle.min.css";
// .swiper {
//   width: 4rem;
//     height: 2.5rem;
//      line-height: 2.5rem;
    
//     text-align: center;
//      background-color: rgb(248, 248, 248);
//     color: #565656;
// }

// .swiper-slide {
//   text-align: center;
//   font-size: 0.7rem;
//   background: #fff;
//   display: flex;
//   justify-content: center;
//   align-items: center;
// }

ul {
  margin-bottom: 3rem;
  float: left;
  li {
    list-style: none;
    background-color: rgb(248, 248, 248);
    color: #565656;
    width: 4rem;
    height: 2.5rem;
    line-height: 2.5rem;
    font-size: 0.7rem;
    text-align: center;
  }
}
.You {
  float: right;
  margin-bottom: 3rem;
  .nv {
    width: 16rem;
    background-color: rgb(255, 255, 255);
    display: flex;
    padding-bottom: 0.5rem;
    .img-1 {
      width: 5.5rem;
      margin-left: 0.5rem;
    }
    .nav {
      margin: 0 0.5rem;
      .span-1 {
        font-size: 0.5rem;
        padding: 0.1rem;
        background-color: #ff4c28;
        color: #ffe4de;
        border-radius: 2px;
      }
      .span-2 {
        margin-left: 0.5rem;
        font-size: 0.8rem;
      }
      p {
        border: 2px solid #e97146;
        color: #e97146;
        width: 7rem;
        font-size: 0.6rem;
        padding: 0.1rem;
        margin: 0.2rem 0;
        border-radius: 5px;
      }
      .button {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .span-3 {
          color: #e86a3d;
          font-weight: 600;
          font-size: 0.8rem;
        }
        .span-4 {
          font-size: 0.7rem;
          color: #8f8f8f;
        }
      }
    }
  }
}
.aa {
  color: rgb(212, 23, 23);
}
.beijing {
  background-color: rgb(255, 255, 255);
  color: rgb(255, 0, 0);
}
</style>